package com.zmn.oms.dubbo.interfaces.statistics;

import com.zmn.common.dto2.ResponseDTO;
import com.zmn.oms.common.dio.normal.statistics.MasterOrderStatDIO;
import com.zmn.oms.common.dro.statistics.MasterOrderStatDRO;
import com.zmn.oms.common.dro.statistics.UserOrderStatDRO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 类描述：订单统计
 *
 * @author heciqi
 * @date 2021/10/28 17:46
 */
@Api(
		value = "订单统计",
		tags = {"订单统计"}
)
public interface StatOrderRemoteService {

	/**
	 * 用户订单统计
	 * @param userList
	 * @return
	 */
	@ApiOperation(
			value = "用户订单统计",
			response = ResponseDTO.class,
			tags = {"用户订单统计"}
	)
	ResponseDTO<UserOrderStatDRO> getUserOrderStat(@ApiParam(name = "list", required = true, value = "用户列表")
												   @NotNull(message = "参数不能为空")
												   @Size(min = 1, max = 500, message = "数组长度不能超过500")
														   List<Long> userList);

	@ApiOperation(
			value = "根据工程师ID,时间范围。全部订单统计",
			response = ResponseDTO.class,
			tags = {"失败订单统计"}
	)
	ResponseDTO<MasterOrderStatDRO> getOrderStatByMasterId
			(@NotNull(message = "入参不能为空") MasterOrderStatDIO masterOrderStatDIO);

	@ApiOperation(
			value = "根据根据手机号查询进行中的分类",
			response = ResponseDTO.class,
			tags = {"工单分类统计"}
	)
	ResponseDTO<List<Integer>> listServCategoryIdsByPhone(@NotEmpty(message = "入参不能为空")String phone);

}
